<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>6.270 - JoyOS: kern/global.h File Reference</title>
	<link href="main.css" media="screen" rel="Stylesheet" type="text/css"/>
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>  
<body>
	<div id="header">
		<div id="headerb">
		<div id="headtext">
			<span class="titletext">AUTONOMOUS ROBOT DESIGN COMPETITION</span>
			6.270
		</div>
		<div class="mainmenu">
			<a href="http://web.mit.edu/6.270/www">Home</a>
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/about/">About</a> 
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/sponsors/">Sponsors</a>
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/contests/">Past Contests</a> 
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/contestants/">Contestant Information</a>
		</div>
	</div>
	</div>

<div class="maincontent">
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>kern/global.h File Reference</h1>Miscellaneous kernel support functions. <a href="#_details">More...</a>
<p>
<code>#include &lt;stddef.h&gt;</code><br>
<code>#include &quot;config.h&quot;</code><br>
<code>#include &lt;avr/pgmspace.h&gt;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8566f9151b991bf691e5974a2ca33ce7"></a><!-- doxytag: member="global.h::JOYOS_VERSION" ref="8566f9151b991bf691e5974a2ca33ce7" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#8566f9151b991bf691e5974a2ca33ce7">JOYOS_VERSION</a>&nbsp;&nbsp;&nbsp;&quot;0.2.3&quot;</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Current JoyOS version. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#92ad17d19a46880dd5e6c99143666b4a">panic</a> (char *msg)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#d22764619b1d78ecf538af02249915e8">set_auto_halt</a> (uint8_t ah)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This header includes kernel-level support and debbugging functions as well as JoyOS version information. <hr><h2>Function Documentation</h2>
<a class="anchor" name="92ad17d19a46880dd5e6c99143666b4a"></a><!-- doxytag: member="global.h::panic" ref="92ad17d19a46880dd5e6c99143666b4a" args="(char *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void panic           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>msg</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
System panic. Call this routine to halt the board and display an error message on the LCD. This routine never returns.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>Display "panic: msg" on the LCD. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="d22764619b1d78ecf538af02249915e8"></a><!-- doxytag: member="global.h::set_auto_halt" ref="d22764619b1d78ecf538af02249915e8" args="(uint8_t ah)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_auto_halt           </td>
          <td>(</td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>ah</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enable or disable the Auto-halt. By default after 60 seconds, the kernel will disable all motors and servos and halt. To disable this functionality call set_auto_halt(0);<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ah</em>&nbsp;</td><td>whether to enable or disable auto-halt functionality </td></tr>
  </table>
</dl>

</div>
</div><p>
</div>
<div class="maincontent">
	<div class="footer centre">
		<hr>
		Generated on Tue Jan 29 23:17:08 2008 by&nbsp;<a href="http://www.doxygen.org/index.html">Doxygen</a> 1.5.1<br/>
		6.270 Staff, 2008 | 
		<a href="mailto:6.270-organizers@mit.edu">Contact Us</a> | 
		<a href="http://web.mit.edu">MIT</a>
	</div>
</div>
</body>
</html>
